package net.csdn.business.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author likun
 * @date 2023/2/15 14:09
 */
public interface IssueTemplateEnum {
    @Getter
    @AllArgsConstructor
    enum DirTypeEnum {
        /**
         * atomgit 目录
         */
        ATOMGIT(1, ".atomgit/ISSUE_TEMPLATE"),
        GITHUB(2, ".github/ISSUE_TEMPLATE"),
        ;
        private final int type;
        private final String dir;

        public static DirTypeEnum ofType(int type) {
            for (DirTypeEnum dirType : DirTypeEnum.values()) {
                if (dirType.getType() == type) {
                    return dirType;
                }
            }
            throw new IllegalArgumentException("IssueTemplateEnum#DirTypeEnum param error");
        }
    }
}